Head and Tail

So, we can construct any list we like, but we still can't get any information out of it. To begin with, we'd like to be able to get the head and tail of a list.

#math129#
Head~xs = xs~First~Error  
Tail~xs = xs~Second~Error  

For example, the tail of x : xs is
#math130#
Tail~(Cons~x~xs);SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;
  = Cons~x~xs~Second~Error  
  = Second~x~xs  
= xsThetailof$[  ]$ is, asonewouldexpect,#tex2html_wrap_indisplay_indisplay2413#Tail~Nil;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;
  = Nil~Second~Error  
= ErrorAndtheheadof$Stream~ais#tex2html_wrap_indisplay_indisplay2417#Head~(Stream~a);SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;
  = Stream~a~First~Error  
  = Cons~a~(Stream~a)~First~Error  
  = First~a~(Stream~a)  
  = #tex2html_wrap_indisplay2426#Abandonverificationallyewhoenterhere! :}:<<#832#>#tex2html_wrap_indisplay2427#Stream#tex2html_wrap_indisplay2428#828>>:}aSowecangettheheadofaninfinitelistinfinitetime.Thisisfortunate, asotherwisetherewouldn'tbemuchpointinallowinginfiniteobjects.